<div class="set-home-page">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true" aria-label="Close" ng-click="cancel()">
      <span class="pficon pficon-close"></span>
    </button>
    <h1 class="modal-title">Set Home Page</h1>
  </div>
  <div class="modal-body">
    <p>
      Note: This setting is browser-specific and will not be maintained across browsers.
    </p>
    <form name="homePageForm">
      <fieldset ng-disabled="loading">
        <div class="radio">
          <label>
            <input type="radio" ng-model="homePagePreference" value="catalog-home">
            Catalog Home (Default)
          </label>
        </div>
        <div class="radio">
          <label>
            <input type="radio" ng-model="homePagePreference" value="project-list">
            My Projects List
          </label>
        </div>
        <div class="radio" ng-show="availableProjects.length >= 1">
          <label>
            <input type="radio" ng-model="homePagePreference" value="project-overview">
            Overview Page for{{availableProjects.length === 1 ? ' ' + (selectedProject | displayName) : ':'}}
          </label>
          <div class="select-project-container" ng-if="availableProjects.length > 1">
            <select-project is-required="homePagePreference === 'project-overview'"
                            skip-can-add-validation="true"
                            on-project-selected="onProjectSelected"
                            on-open="onOpen"
                            available-projects="availableProjects"
                            selected-project="selectedProject"
                            hide-create-project="true"
                            hide-label="true">
            </select-project>
          </div>
        </div>
      </fieldset>
    </form>
  </div>
  <div class="modal-footer">
    <button class="btn btn-default" type="button" ng-click="cancel()">Cancel</button>
    <button class="btn btn-primary" type="button"
            ng-disabled="homePageForm.$invalid || homePageForm.$pristine"
            ng-click="setHomePage()">Save</button>
  </div>
</div>
